package com.sino.operation.autoCompareNode;

import lombok.Data;

/**
 * @Title: AutoCompareEntity
 * @Description: 自动比对返回实体
 * @Author dengls
 * @date 2021/9/17 14:59
 */
@Data
public class AutoCompareEntity {
    /*比对是否通过*/
    private Boolean flag;
    /*失败理由*/
    private String failReason;

    private AutoCompareEntity() {

    }

    public static AutoCompareEntity error(String reason) {
        AutoCompareEntity autoCompareEntity = new AutoCompareEntity();
        autoCompareEntity.setFlag(false);
        autoCompareEntity.setFailReason(reason);
        return autoCompareEntity;
    }

    public static AutoCompareEntity ok() {
        AutoCompareEntity autoCompareEntity = new AutoCompareEntity();
        autoCompareEntity.setFlag(true);
        return autoCompareEntity;
    }
}
